package com.mofang.ticketing.user.serve.feigntest;


import com.mofang.ticketing.base.client.api.BaseClient;
import com.mofang.ticketing.base.client.pojo.request.SysConfigGetReqDTO;
import com.mofang.ticketing.common.core.enums.account.RoleTypeEnum;
import com.mofang.ticketing.common.core.result.Result;
import com.mofang.ticketing.common.core.urls.user.account.AuthUrl;
import com.mofang.ticketing.user.serve.account.service.AuthService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author LGC
 */
@Slf4j
@Api(tags = "feigntest")
@RestController
public class FeigntestController {
    @Resource
    private BaseClient baseClient;

    @ApiOperation(value = "初始化权限")
    @GetMapping(value = "/feigntest")
    public Result<String> feigntest() {
        // 此时这里完成自动解包Result，成功直接获取 data 不成功抛出自定义异常
        String rs = baseClient.feigntest();
        log.info("user 端：{}", rs);
        log.info("user 端执行其它逻辑。。。。。。。。");
        return Result.success(rs);
    }
}
